﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using Emgu.CV;
using Emgu.CV.Structure;
using Emgu.CV.CvEnum;


namespace FuseBoxInspector
{
    public class Inspector
    {
        private Capture camera;

        public Inspector()
        {
            
        }

        public void openCam()
        {
            this.camera = new Capture(0);
        }

        public void closeCam()
        {
            this.camera.Dispose();
            this.camera = null;
        }

        public Image<Bgr,byte> loadImage()
        {
            Image<Bgr, Byte> image = this.camera.QueryFrame();
                //new Image<Bgr, Byte>((Bitmap)Bitmap.FromFile("fusebox.jpg"));
            return image;
        }
        
    }
}
